#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
    int h = 0, m = 0, s = 0, total = 0;
    scanf("%d", &total);
    h = total / 60 / 60;
    m = total / 60 % 60;
    s = total % 60;
    printf("%d %d %d", h, m, s);
    return 0;
}